import yagmail

def mail(file):
    em = yagmail.SMTP(user='zzh2834326498@qq.com',password='rbtbgahnvdwaddbf',host='smtp.qq.com',port='465')
    em.send(to='zzh2834326498@qq.com',subject='测试报告',contents='请查收',attachments=file)